package cate.game.train.hero.msg;

import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgOutput;
import cate.game.client.msg.id.MsgIdBTrain;
import cate.game.res.MixRes;
import cate.game.res.RewardShow;
import cate.game.role.bag.hero.Hero;
import easy.java.dev.note.NoteField;

import java.util.List;
import java.util.Map;

@ClientMsg(title = "英雄回退 の 返回")
public class HeroBackResp implements MsgOutput {
    @NoteField(value = "英雄唯一ID")
    public String uid;

    @NoteField(value = "英雄")
    public Hero hero;

    @NoteField(value = "本次回退获得的奖励")
    public MixRes reward;

    @NoteField(value = "实例奖励", detail = "Map<背包类型,实例id们>")
    public Map<Byte, List<String>> instanceMap;

    public HeroBackResp(){}

    public HeroBackResp(String uid, Hero hero, RewardShow show) {
        this.uid = uid;
        this.hero = hero;
        this.reward = show.tplRwd;
        this.instanceMap = show.insRwd;
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.HERO_BACK_RESP;
    }
}
